﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="buscaSimples.aspx.cs" Inherits="UI.buscaSimples" MasterPageFile="~/wiki.Master"%>

<asp:Content ID = "contentBuscarPostNew" runat="server" ContentPlaceHolderID="ContentPlaceHolder">
    <h2> Busca Simples</h2>
    <asp:UpdatePanel ID="upPostNew" runat="server">
        <ContentTemplate>
            <asp:ScriptManager ID="ScriptManager" runat="server">
            </asp:ScriptManager>
            <asp:GridView ID="gvPostNew" runat="server" AutoGenerateColumns="False" 
                CellPadding="4" DataKeyNames="idPostNew" 
                EmptyDataText="Nenhuma Pos New Encontrada!" ForeColor="#333333" 
                GridLines="None" style="font-size: 10pt" Width="480px" AllowPaging="True" 
                PageSize="20" onpageindexchanging="gvPostNew_PageIndexChanging">
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <Columns>
                    <asp:TemplateField HeaderText="Data Postagem">
                        <ItemTemplate>
                            <%# Eval("data") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Usuário">
                        <ItemTemplate>
                            <%# Eval("Usuario.nome") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Titulo">
                        <ItemTemplate>
                            <a href='visualizarPostNew.aspx?idPostNew=<%# Eval("idPostNew") %>'>
                            <%# Eval("titulo") %></a> <%--<%# Eval("titulo") %>--%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Qtd. Lidas">
                        <ItemTemplate>
                            <%# Eval("qtdLidas") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#999999" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
            <br />
            <asp:UpdateProgress ID="UpdateProgress" runat="server" 
                AssociatedUpdatePanelID="upPostNew" DisplayAfter="10">
                <ProgressTemplate>
                <center>
                    <img alt="" src="Images/carregando.gif" style="width: 16px; height: 16px" />
                </center>    
                </ProgressTemplate>
            </asp:UpdateProgress>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="gvPostNew" EventName="PageIndexChanging">
            </asp:AsyncPostBackTrigger>
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
